<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link type="text/css" rel="stylesheet" href="css/login.css"/>
    <script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="js/login.js"></script>
    <title>简历</title>
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
     <script type="text/javascript">

        /**
         * 获取当前页所有输入的值,没写的要补上
         */
        /*
            var sex;
            var degree;
            var sal;
            var type;
            var city;
            var status;

            /!**
             * 获得性别
             *!/
            $("#sex").click(function () {
                sex = $(this).val();
            });


            /!**
             * 通过下拉列表获取到学历位置的下拉值，转换成字符串型的文字
             *!/
            $("#degree").change(function () {
                degree = $(this).val();
            });

            /!**
             * 通过下拉列表获取到工作类型位置的下拉值，转换成字符串型的文字
             *!/
            $("#city").change(function () {
                city =$(this).val();
            });

            /!**
             * 通过下拉列表获取到薪资位置的下拉值，转换成字符串型的文字
             *!/
            $("#sal").change(function () {
                sal = $(this).val();
            });

            /!**
             * 通过下拉列表获取到工作类型位置的下拉值，转换成字符串型的文字
             *!/
            $("#type").change(function () {
                type = $(this).val();
            });

            /!**
             * 通过下拉列表获取到求职状态位置的下拉值，转换成字符串型的文字
             *!/
            $("#status").change(function () {
                status = $(this).val();
            });*/
        $(document).ready(function () {

            var sex;
            $("#boy").click(function () {
                sex = $(this).text();

            });
            $("#girl").click(function () {
                sex = $(this).text();

            });

            /**
             * 单击“生成简历”，获取以上所有数据到数据库的简历表中，存储到当前用户id下
             */

            $("[name='生成简历']").click(function () {


                var uid = localStorage.getItem("result");
                var xingming = $("[name='xingming']").val();
                var chushengyu = $("[name='chushengyu']").val();
                var shoujihao = $("[name='shoujihao']").val();
                var biyexuexiao = $("[name='biyexuexiao']").val();
                var degree = $("[name='degree']").val();
                var zhuanyemingcheng = $("[name='zhuanyemingcheng']").val();
                var suoxuezhuanye = $("[name='suoxuezhuanye']").val();
                var city = $("[name='city']").val();
                var sal = $("[name='sal']").val();
                var type = $("[name='type']").val();
                var status = $("[name='status']").val();
                var youxiang = $("[name='youxiang']").val();
                $.get("Resume/add1", {
                    "uid":uid,
                    "name":xingming,
                    "sex":sex,
                    "birthAddress":chushengyu,
                    "phone":shoujihao,
                    "school":biyexuexiao,
                    "degree":degree,
                    "professName":zhuanyemingcheng,
                    "classname":suoxuezhuanye,
                    "expectedAddress":city,
                    "sal":sal,
                    "work":type,
                    "jobStatus":status,
                    "email":youxiang
                }, function (ct) {

                    if (ct.status == 400) {
                        alert("简历保存成功");
                        window.location.href = "index1.html";
                    } else {
                        alert("保存失败，请先登录");
                    }
                });
            });
        });
    </script>
</head>

<body>
<div class="header">
    <div class="mainwarp">
        <div class="logo"><a href="index.html"><img src="images/log.png"/></a></div>
        <div class="welcome">欢迎注册</div>
        <div class="headerright">
            <a href="login.html">个人登录</a>
            <span>|</span>
            <a href="index.html">返回首页</a>
        </div>
    </div>
</div>
<div class="jianliBox">
    <div class="jlpart1">
        <img src="images/img1.png"/>
    </div>
    <div id="shengcehng" class="jlpart2">
        <div class="jlpart2_1">
            <div class="jlbox1">
                <h1>一分钟填写简历</h1>
                <p>填写以下信息即可生成一份简历，一步注册，起航你的成功之梦！</p>
            </div>
            <div class="jlbox2">
                <span class="tit">姓名</span>
                <input name="xingming" type="text" class="txtcon txt1"/>
            </div>
            <div id="sex" class="jlbox2">
                <span class="tit">我是</span>
                <div id="boy"  class="sex on">男</div>
                <div id="girl"  class="sex">女</div>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">出生于</span>
                <input name="chushengyu" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">手机号</span>
                <input name="shoujihao" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">毕业学校</span>
                <input name="biyexuexiao" type="text" class="txtcon txt3"/>
                <select name="degree" class="txtcon txt5">
                    <option value="1">初中及以下</option>
                    <option value="2">中专/中技</option>
                    <option value="3">高中</option>
                    <option value="4">大专</option>
                    <option value="5">硕士</option>
                    <option value="6">本科</option>
                    <option value="7">博士</option>
                </select>
                <div class="titxt">学历</div>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">专业名称</span>
                <input name="zhuanyemingcheng" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">所学专业</span>
                <input name="suoxuezhuanye" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">想在</span>
                <select name="city" class="txtcon txt5">
                    <option value="1">北京</option>
                    <option value="2">上海</option>
                    <option value="3">深圳</option>
                    <option value="4">广州</option>
                    <option value="5">长春</option>
                </select>
                <div class="titxt">找月薪</div>
                <select name="sal" class="txtcon txt6">
                    <option value="1">30000以上</option>
                    <option value="2">20000-30000</option>
                    <option value="3">10000-20000</option>
                    <option value="4">5000-10000</option>
                    <option value="5">5000以下</option>
                </select>
                <div class="titxt">的</div>
                <select name="type" class="txtcon txt5">
                    <option value="1">全职</option>
                    <option value="2">兼职</option>
                    <option value="3">实习</option>
                </select>
                <div class="titxt">工作</div>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">求职状态</span>
                <select name="status" class="txtcon txt2">
                    <option value="1">离职-随时到岗</option>
                    <option value="2">在职-月内到岗</option>
                    <option value="3">在职-考虑机会</option>
                    <option value="4">在职-暂不考虑</option>
                </select>
            </div>
            <div class="jlbox2">
                <span class="tit">邮箱</span>
                <input name="youxiang" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <input name="生成简历" type="button" value="生成简历" class="jlbtn"/>
            </div>
        </div>
    </div>
</div>

<div class="clear"></div>
<div class="footer">
</div>
</body>
</html>
